<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>作业任务</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="row">
            <div class="col-md-4 column">
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/task/toAddTask">发布任务</a>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/task/allTask">显示全部作业任务</a>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/toUpload">上传文件</a>
            </div>
            <div class="col-md-8 column">
<%--                <form class="form-inline" action="" method="post" style="float: right">--%>
<%--                    <input type="text" name="" class="form-control" placeholder="请输入要查询的任务" />--%>
<%--                    <input type="submit" value="查询" class="btn btn-primary" />--%>
<%--                </form>--%>
            </div>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>作业任务id</th>
                    <th>作业任务名字</th>
                    <th>开始日期</th>
                    <th>截止日期</th>
                    <th>问题</th>
                    <th>附件</th>
                    <th>课程名</th>
                    <th>操作</th>
                </tr>
                </thead>
                <!--                foreach-->
                <tbody>
                <c:forEach var="task" items="${taskList}">
                    <tr>
                        <td>${task.task_id}</td>
                        <td>${task.task_name}</td>
                        <td><input type="text" readonly value="${task.start_time}"/></td>
                        <td><input type="text" readonly value="${task.stop_time}"/></td>
                        <td><input type="text" readonly value="${task.text_content}"/></td>
                        <td><a href="${pageContext.request.contextPath}/task/excelTest?task_id=${task.task_id}">${task.tipss}</a></td>
                        <td>${task.cname}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/task/toUpdateTask?task_id=${task.task_id}">修改</a>
                            &nbsp; | &nbsp;
                            <a href="${pageContext.request.contextPath}/task/deleteTask?task_id=${task.task_id}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>

</div>
</body>
</html>
